#include "AntTweakBar.h"
#include "Game.h"
#include <SDL.h>

void AntTweakBar::Init()
{
	TwInit(TW_OPENGL_CORE, NULL);
	int width = TheGame::Instance()->ReturnResolutionX();
	int height = TheGame::Instance()->ReturnResolutionY();
	TwWindowSize(width, height);
	m_Bar = TwNewBar("OpenGL TweakBar!");
}

void AntTweakBar::Update()
{
}

void AntTweakBar::Draw()
{
	TwDraw();
}

void AntTweakBar::AddVar(const std::string& Name, TwType Type, void* VarPointer, const std::string& Def)
{
	TwAddVarRW(m_Bar, Name.c_str(), Type, VarPointer, Def.c_str()); 
}

void AntTweakBar::AddButton( const char *name, TwButtonCallback callback, void *clientData, const char *def )
{
	TwAddButton(m_Bar, name, callback, clientData, def);
}

